<div class="modal fade" id="modal-notice">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title text-center">添加用户通知</h4>
            </div>
            <form action="{{route('notice_add')}}" method="post" enctype="multipart/form-data">
                {{csrf_field()}}
                <div class="modal-body">
                    <div class="form-group">
                        <label for="type" class="control-label">通知的类型:</label>
                        <div class="">
                            <select name="type" id="type" class="form-control">

                                <option value="2" @if(old('type')==2) selected @endif>文章</option>

                                <option value="1" @if(old('type')==1) selected @endif>视频</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="title" class="control-label">通知的标题:</label>
                        <div class="">
                            <input type="text" name="title" id="title" class="form-control" value="{{old('title')}}"
                                   required="required">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="notice_id" class="control-label">通知的对应的文章或者视频:</label>
                        <div class="">
                            <select name="notice_id" id="notice_id" class="form-control">
                                <option value="">文章</option>
                                @foreach($article as $k=>$v)
                                    <option value="{{$v->id}}">
                                        &nbsp;&nbsp;&nbsp;&nbsp;└──&nbsp;{{str_limit($v->title,20)}}</option>
                                @endforeach
                                <option value="">视频</option>
                                @foreach($video as $k=>$v)
                                    <option value="{{$v->id}}">
                                        &nbsp;&nbsp;&nbsp;&nbsp;└──&nbsp;{{str_limit($v->title,20)}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-info">保存</button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->